using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using NTTHAO.CommonWeb;
using System.IO;

public partial class admin_ImagesBrowser : System.Web.UI.Page
{
    public string[] _UploadedFilesList = new string[0];
    public bool[] _IsImageFiles = new bool[0];
    public string[] _UploadedFilesExtention = new string[0];

    protected void Page_Load(object sender, EventArgs e)
    {
        NTTHAO.CommonWeb.LanguageUtility.CheckLanguage(Request, Response, Session);

        try
        {
            _UploadedFilesList = Directory.GetFiles(Server.MapPath("../" + Constant.UPLOAD_FILE_PATH));
            _IsImageFiles = new bool[_UploadedFilesList.Length];
            _UploadedFilesExtention = new string[_UploadedFilesList.Length];
            for (int i = 0; i < _UploadedFilesList.Length; i++)
            {
                _UploadedFilesList[i] = Path.GetFileName(_UploadedFilesList[i]);
                _UploadedFilesExtention[i] = Path.GetExtension(_UploadedFilesList[i]).ToLower();

                if (Constant.IMAGE_FILE_EXTENTIONS.Contains(_UploadedFilesExtention[i]))
                {
                    _IsImageFiles[i] = true;
                }
                else
                {
                    _IsImageFiles[i] = false;
                }
            }
        }
        catch (Exception)
        {
        }
    }
}
